Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

app/src/main/java/com/geeksville/mesh/android/Logging.kt ui_message_list (be3f882f) Text, 1.70 KB

T8b949e/*
* Copyright (c) 2025 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

Tff7b72package T7ee787com.geeksville.mesh.android

Tff7b72import T7ee787timber.log.Timber

Tff7b72interface T56d364Logging Tb4b4b4{

Tff7b72private Tff7b72fun Td2a8fftagTb4b4b4(Tb4b4b4)Tb4b4b4: Tffa657String Tff7b72= Tff7b72thisTb4b4b4.Te6edf3javaClassTb4b4b4.Te6edf3name

Tff7b72fun Td2a8ffinfoTb4b4b4(Te6edf3msgTb4b4b4: Tffa657StringTb4b4b4) Tff7b72= Te6edf3TimberTb4b4b4.Te6edf3tagTb4b4b4(Te6edf3tagTb4b4b4(Tb4b4b4)Tb4b4b4)Tb4b4b4.Te6edf3iTb4b4b4(Te6edf3msgTb4b4b4)

Tff7b72fun Td2a8ffdebugTb4b4b4(Te6edf3msgTb4b4b4: Tffa657StringTb4b4b4) Tff7b72= Te6edf3TimberTb4b4b4.Te6edf3tagTb4b4b4(Te6edf3tagTb4b4b4(Tb4b4b4)Tb4b4b4)Tb4b4b4.Te6edf3dTb4b4b4(Te6edf3msgTb4b4b4)

Tff7b72fun Td2a8ffwarnTb4b4b4(Te6edf3msgTb4b4b4: Tffa657StringTb4b4b4) Tff7b72= Te6edf3TimberTb4b4b4.Te6edf3tagTb4b4b4(Te6edf3tagTb4b4b4(Tb4b4b4)Tb4b4b4)Tb4b4b4.Te6edf3wTb4b4b4(Te6edf3msgTb4b4b4)

T8b949e/**
* Log an error message, note - we call this errormsg rather than error because error() is a stdlib function in
* kotlin in the global namespace and we don't want users to accidentally call that.
*/
Tff7b72fun Td2a8fferrormsgTb4b4b4(Te6edf3msgTb4b4b4: Tffa657StringTb4b4b4, Te6edf3exTb4b4b4: Te6edf3Throwable? Tff7b72= Tff7b72nullTb4b4b4) Tb4b4b4{
Tff7b72if Tb4b4b4(Te6edf3exTff7b72?.Te6edf3message Tff7b72!Tff7b72= Tff7b72nullTb4b4b4) Tb4b4b4{
Te6edf3TimberTb4b4b4.Te6edf3tagTb4b4b4(Te6edf3tagTb4b4b4(Tb4b4b4)Tb4b4b4)Tb4b4b4.Te6edf3eTb4b4b4(Te6edf3exTb4b4b4, Te6edf3msgTb4b4b4)
Tb4b4b4} Tff7b72else Tb4b4b4{
Te6edf3TimberTb4b4b4.Te6edf3tagTb4b4b4(Te6edf3tagTb4b4b4(Tb4b4b4)Tb4b4b4)Tb4b4b4.Te6edf3eTb4b4b4(Te6edf3msgTb4b4b4)
Tb4b4b4}
Tb4b4b4}

T8b949e// / Kotlin assertions are disabled on android, so instead we use this assert helper
Tff7b72fun Td2a8fflogAssertTb4b4b4(Te6edf3fTb4b4b4: Tffa657BooleanTb4b4b4) Tb4b4b4{
Tff7b72if Tb4b4b4(Tff7b72!Te6edf3fTb4b4b4) Tb4b4b4{
Tff7b72val Te6edf3ex Tff7b72= Te6edf3AssertionErrorTb4b4b4(Ta5d6ff"Ta5d6ffAssertion failedTa5d6ff"Tb4b4b4)

T8b949e// if(!Debug.isDebuggerConnected())
Tff7b72throw Te6edf3ex
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.04s